package com.scaffold.controller;

import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.Map;

/**
 * @author Da Shuai
 * @since 2021-08-30 16:21:01
 */
@Api(tags = "缓存")
@RequestMapping("/cache")
public interface CacheApi {

    @PostMapping("/init")
    void init();

    @GetMapping("/key/list")
    Collection<String> listKey();

    @GetMapping("/value")
    Object get(@RequestParam String key);

    @GetMapping("/value/list")
    Map<String,Object> listValue();

    @GetMapping("/stats")
    String getStats();
}
